package cn.nkjobsearch.convert;

/**
0	全职
1	兼职
2	实习
 * */
public class JobNature {
	public static int convert(String jobNature, char fromSite) {
		if(fromSite == '5') {
			return job51(jobNature);
		} else if(fromSite == 'c') {
			return chinaHR(jobNature);
		} else if(fromSite == 'z') {
			return zhilian(jobNature);
		} else {
			return 0;
		}
	}
	
	private static int job51(String jobNature) {
		return 0;
	}
	
	private static int zhilian(String jobNature) {
		if(jobNature == null || jobNature.equals("null")) {
			return 0;
		}
		if(jobNature.equals("全职")) {
			return 0;
		}
		if(jobNature.equals("实习")) {
			return 2;
		}
		if(jobNature.equals("兼职")) {
			return 1;
		}
		return 0;
	}
	
	private static int chinaHR(String jobNature) {
		if(jobNature == null || jobNature.equals("null")) {
			return 0;
		}
		if(jobNature.equals("全职")) {
			return 0;
		}
		if(jobNature.equals("实习")) {
			return 2;
		}
		if(jobNature.equals("兼职")) {
			return 1;
		}
		if(jobNature.equals("临时")) {
			return 1;
		}
		return 0;
	}
}
